﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_MailRemove]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_MailRemove];
GO
-------------------------------------------------------------------------------
-- sproc_MailRemoveToTrash
----MailIDStr 格式示例: MailID=12 or MailID=34 or MailID=56
-------------------------------------------------------------------------------
CREATE PROCEDURE [dbo].[sproc_MailRemove]
(
    @FolderType int ,
    @MailIDStr NVARCHAR(4000)
)
AS
  
   DECLARE @Sql NVARCHAR(4000)    
    SET @Sql =  "UPDATE TabMailList SET MailFolderType="+ CONVERT(nvarchar(6), @FolderType)+"   WHERE "+ @MailIDStr
   EXECUTE ( @Sql)